import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/Login'
import Home from '@/views/Home'
import Welcome from '@/views/Welcome'
import Users from '@/components/user/Users'
import Rights from '@/components/right/Rights'
import Roles from '@/components/right/Roles'
import Projects from '@/components/project/Projects'
import Demend from '@/components/process/Demend'
import Plan from '@/components/process/Plan'
import Cases from '@/components/process/Cases'
import Records_view from '@/components/process/Records_view'
import Records from '@/components/process/Records'
import Report from '@/components/process/Report'
import Quality from '@/components/quality/Quality'
import Case_room from '@/components/process/Case_room'
import Gongneng from '@/components/process/cases/Gongneng'
import Gntable from '@/components/process/cases/Gntable'
import Library from '@/components/process/cases/Library'



Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/login'
    },
    {
      path:'/login',
      component:Login
    },
    {
      path:'/home',
      component:Home,
      redirect:'/welcome',
      children: [{
        path: '/welcome',
        component: Welcome
      },
      {
        path:'/users',
        component:Users
      },
      {
        path:'/rights',
        component:Rights
      },
      {
        path:'/roles',
        component:Roles
      },
      {
        path:'/projects',
        component:Projects
      },
      {
        path:'/demend',
        component:Demend
      },
      {
        path:'/plan',
        component:Plan
      },
      {
        path:'/cases',
        component:Cases,
        redirect:'/library',
        children: [{
          path:'/library',
          component:Library
        },{
          path:'/cases/gongneng',
          component:Gongneng
        },{
          path:'/cases/gntable',
          component:Gntable
        }]
      },
      {
        path:'/records_view',
        component:Records_view
      },
      {
        path:'/records',
        component:Records
      },
      {
        path:'/report',
        component:Report
      },
      {
        path:'/case_room',
        component:Case_room
      },
      {
        path:'/quality',
        component:Quality
      },
    ]
    }
  ]
})
